// const spring=0;
// const summer=1;
// const autumn=2;
// const winter=3;

void main(){
  var currentSeason = Season.autumn;
  print(currentSeason.index);//枚举的下标也从0开始
  switch(currentSeason){
    case Season.spring:
      print('1-3月');
    break;
    case Season.summer:
      print('4-6月');
    break;
    case Season.autumn:
      print('7-9月');
    break;
    case Season.winter:
      print('10-12月');
    break;
  }
}

//枚举里面不能添加方法，不能指定原始值
enum Season{
  spring,
  summer,
  autumn,
  winter
}